import { httpAxios,downLoadFile } from "../utils/httpAxios.js"
import { domain } from "../utils/config.js"

function login(data){//登录接口
	return httpAxios("/login", "POST", data);
};
function loginResetPwd(data){//重置店铺密码
  return httpAxios("/shop/resetPwd", "POST", data);
};
function restUser(data,method){//重置密码
  return httpAxios("/user/rest", "PUT", data);
};
function modPwd(data){//修改密码
	return httpAxios("/login/pwd", "PUT", data);
};
function routerMenusList(data){//获取路由
  return httpAxios("/user/menus", "GET", data);
};
function yesterday(data){//首页 昨日数据
	return httpAxios("/trans/yesterday", "GET", data);
};
function merchantShopList(data){//服务商下店铺列表
	return httpAxios("/posmerchant/base/page", "GET", data);
};
function merchantShopAll(data){//服务商下商户列表
	return httpAxios("/posmerchant/all", "GET", data);
};
function dailyStat(data){//商户日汇总
	return httpAxios("/dailystat/sum/page", "GET", data);
};
function dailyStatExpor(data){//商户日汇总下载表格
    return downLoadFile("/export/sumdaily", "GET", data);
};
function monthStat(data){//代理商月汇总
	return httpAxios("/monthstat", "GET", data);
};
function payListOrder(data){//支付列表
	return httpAxios("/order/page", "GET", data);
};
function ztShopAll(data){//中台代理商下所有店铺
	return httpAxios("/shop/all", "GET", data);
};
function deviceBaseAll(data){//查询收银机列表
	return httpAxios("/device/all", "GET", data);
};
function transactionList(data){//支付列表
	return httpAxios("/trans/order", "GET", data);
};
function shopListInfo(data){//店铺日统计
	return httpAxios("/dailystat/page", "GET", data);
};
function deviceList(data){//设备列表
	return httpAxios("/device/page", "GET", data);
};
function addRevDevice(data,method){//新增修改设备
  return httpAxios("/device/base", method, data);
};
function delDevice(data){//删除设备
  return httpAxios("/device/base/"+data.id, "DELETE", {});
};
function integralruleList(data){//积分列表
	return httpAxios("/integralrule/page", "GET", data);
};
function addDevIntegralrule(data,method){//积分增改
	return httpAxios("/integralrule/base", method, data);
};
function delIntegralrule(data){//积分删除
	return httpAxios("/integralrule/base/"+data.id, "DELETE", {});
};
function bagList(data){//购物袋列表
	return httpAxios("/bag/page", "GET", data);
};
function addDevBag(data,method){//购物袋增改
	return httpAxios("/bag/base", method, data);
};
function delBag(data){//购物袋删除
	return httpAxios("/bag/base/"+data.id, "DELETE", {});
};
function snorderList(data){//SN统计列表
	return httpAxios("/orderstatssn/list", "GET", data);
};
function orderDetail(data){//订单详情
	return httpAxios("/orderdetail/all", "GET", data);
};
function ticketAll(data){//查询小票
	return httpAxios("/ticket/"+data.shopId, "GET", {});
};
function addRevTicket(data){//新增修改小票
	return httpAxios("/ticket/save", "POST", data);
};
function paychannelList(data){//支付通道列表--all
  return httpAxios("/paychannel/all", "GET", data);
};
function agentList(data){//代理商分页列表
  return httpAxios("/agentinfo/base/page", "GET", data);
};
function addAgent(data,method){
  return httpAxios("/agentinfo/base", method, data);
};
function agentAuthList(data){//获取一级代理商菜单按钮全部列表
  return httpAxios("/agentinfo/authes", "GET", data);
};
function agentAuthDist(data){//一级代理商勾选基础菜单按钮列表
  return httpAxios("/agentinfo/basic/auth/dist", "GET", data);
};
function addAgentBaseAuth(data){//添加一级代理商勾选基础菜单按钮
  return httpAxios("/agentinfo/basic/auth/dist", "post", data);
};
function firstAgent(data,method){//绑定与修改代理商独有权限
  return httpAxios("/user/agent", method, data);
};

function userList(data){//用户列表
  return httpAxios("/user/page", "GET", data);
};
function userListAll(data){//用户所有列表
  return httpAxios("/user/base/all", "GET", data);
};
function addRevUser(data,method){//添加修改用户
	if(method.toUpperCase()=="POST"){
		return httpAxios("/user/emp", method, data);
	}else{
		return httpAxios("/user/base", method, data);
	}
};
function delUser(data){//删除用户
  return httpAxios("/user/base/"+data.id, "DELETE", data);
};
function distRole(data){//查询用户角色信息
  return httpAxios("/role/dist", "GET", data);
};
function addDistRole(data){//添加用户角色
  return httpAxios("/role/dist", "POST", data);
};
function roleList(data){//角色列表
  return httpAxios("/role/page", "GET", data);
};
function addRevRest(data,method){//添加修改角色
  return httpAxios("/role", method, data);
};
function delRole(data){//删除角色
  return httpAxios("/role/base/"+data.id, "DELETE", data);
};
function authList(data){//权限菜单列表
  return httpAxios("/auth/authes", "GET", data);
};
function distAuth(data){//获取角色选中菜单列表
  return httpAxios("/auth/dist", "GET", data);
};
function addDistAuth(data){//提交角色选中的菜单
  return httpAxios("/auth/dist", "post", data);
};
function posmerchantList(data){//支付平台商户管理列表
  return httpAxios("/posmerchant/page", "GET", data);
};
function addRevPosmerchant(data,method){//新增修改支付平台商户
  return httpAxios("/posmerchant", method, data);
};
function bankList(data){//获取全部银行列表
  return httpAxios("/bank/head", "GET", data);
};
function subBankList(data){//获取选择支行列表
  return httpAxios("/bank", "GET", data);
};
function getPosmerchant(data){//查询支付平台商户信息
  return httpAxios("/posmerchant/"+data.id, "GET", {});
};
function merchantpaychannelList(data){//商户通道列表
  return httpAxios("/merchantpaychannel/base/all", "GET", data);
};
function delmerchantpaychannel(data){//商户通道删除
  return httpAxios("/merchantpaychannel/base/"+data.id, "DELETE", data);
};
function selectwxapply(data){//微信进件查询
  return httpAxios("/merchantadd/selectwxapply","POST", data);
};
function ryxAddpartQuery(data){//瑞银信进件查询
    return httpAxios("/merchantadd/ryx/merchant", "GET", data);
};
function sxfAddpartQuery(data){//随行付进件查询
    return httpAxios("/merchantadd/sxf/merchant", "GET", data);
};
function sxfAddhltxapply(data){//葫芦进件查询
    return httpAxios("/merchantadd/selecthltxapply", "POST", data);
};
function wxAddpart(data){//微信接口进件
  return httpAxios("/merchantadd/wxinterfaceaddpart", "POST", data);
};
function ryxAddpart(data){//瑞银信进件
  return httpAxios("/merchantadd/ryx/merchant", "POST", data);
};
function sxfAddpart(data){//随行付接口进件
  return httpAxios("/merchantadd/sxf/merchant", "POST", data);
};
function multiMerchant(data){//一键进件
    return httpAxios("/merchantadd/multi/merchant", "POST", data);
};
function merchantaddWxaddpart(data){//微信进件
  return httpAxios("/merchantadd/wxaddpart", "POST", data);
};
function hltxaddpart(data){//葫芦天下进件
  return httpAxios("/merchantadd/hltxaddpart", "POST", data);
};
function merchantInput(data){//进件信息保存
  return httpAxios("/merchantinput/base","POST", data);
};
function merchantSelect(data){//进件信息查询
  return httpAxios("/merchantinput/base/one","GET", data);
};
function payModeList(data){//查看配置模式列表
    return httpAxios("/paymode/unionall","GET", data);
};
function addPayMode(data){//修改配置模式
    return httpAxios("/paymode/addList","POST", data);
};
function entryList(data){//入账信息列表
  return httpAxios("/merchantsettl/base/all", "GET", data);
};
function getMerchantpaychannel(data){//商户通道查询
  return httpAxios("/merchantpaychannel/base/"+data.typeId, "GET", {});
};
function addRevDelmerchantpaychannel(data,method){//商户通道删改
  if(method=="POST"||method=="post"){
  	return httpAxios("/merchantpaychannel", method, data);
  }else{
  	return httpAxios("/merchantpaychannel/base", method, data);
  }
};
function shopList(data){//获取店铺列表
  return httpAxios("/shop/unionpage", "GET", data);
};
function erpsysBaseAll(data){
  return httpAxios("/erpsys/base/all", "GET", data);
};
function shopBaseAll(data){//获取店铺全部列表
  return httpAxios("/shop/all", "GET", data);
};
function shopBase(data){//获取店铺表单信息
  return httpAxios("/shop/base/"+data.id, "GET", {});
};
function shopAddAllBase(data,method,url){//添加修改店铺
  return httpAxios("/shop", method, data);
};
function selectShopBasic(data){//店铺 基本信息，结算信息
  return httpAxios("/posmerchant/selectone", "GET", data);
};
function bannerList(data){//广告图列表
  return httpAxios("/banner/base/page", "get", data);
};
function addRevBanner(data,method){//增加删除修改轮播图
  return httpAxios("/banner/base", method, data);
};
function delBanner(data,method){//增加删除修改轮播图
  return httpAxios("/banner/base/"+data.id, method, data);
};
function marketList(data){//获取商超列表
  return httpAxios("/market/unionpage", "GET", data);
};
function addRevMarket(data,method){//添加修改商超
  return httpAxios("/market", method, data);
};
function marketAll(data){//获取商超全部列表
  return httpAxios("/market/all", "GET", data);
};
function cytemplateListAll(data){//支付按钮模板列表全部
  return httpAxios("/cytemplate/base/all", "get", data);
};
function merchantuserList(data){//商超用户列表
  return httpAxios("/merchantuser/page", "GET", data);
};
function addRevmerchantuser(data,method){//添加修改商超用户
  return httpAxios("/merchantuser", method, data);
};
function resetmerchantuserpwd(data){//商超用户密码重置
  return httpAxios("/login/resetmerchantuserpwd", "post", data);
};

export{
	login,
	loginResetPwd,
	modPwd,
	routerMenusList,
	yesterday,
	merchantShopList,
	merchantShopAll,
	dailyStat,
	dailyStatExpor,
	monthStat,
	payListOrder,
	ztShopAll,
	deviceBaseAll,
	transactionList,
	shopListInfo,
	deviceList,
	addRevDevice,
	delDevice,
	integralruleList,
	addDevIntegralrule,
	delIntegralrule,
	bagList,
	addDevBag,
	delBag,
	snorderList,
	orderDetail,
	ticketAll,
	addRevTicket,
	agentList,
	addAgent,
	agentAuthList,
	agentAuthDist,
	addAgentBaseAuth,
	firstAgent,
	restUser,
	paychannelList,
	userList,
	userListAll,
	addRevUser,
	delUser,
	distRole,
	addDistRole,
	roleList,
	addRevRest,
	delRole,
	authList,
	distAuth,
	addDistAuth,
	posmerchantList,
	addRevPosmerchant,
	bankList,
	subBankList,
	getPosmerchant,
	merchantpaychannelList,
	delmerchantpaychannel,
	selectwxapply,
	ryxAddpartQuery,
	sxfAddpartQuery,
	sxfAddhltxapply,
	wxAddpart,
	ryxAddpart,
	sxfAddpart,
	multiMerchant,
	merchantaddWxaddpart,
	hltxaddpart,
	merchantInput,
	merchantSelect,
	payModeList,
	addPayMode,
	entryList,
	getMerchantpaychannel,
	addRevDelmerchantpaychannel,
	shopList,
	erpsysBaseAll,
	shopBaseAll,
	shopBase,
	shopAddAllBase,
	selectShopBasic,
	bannerList,
	addRevBanner,
	delBanner,
	marketList,
	addRevMarket,
	marketAll,
	cytemplateListAll,
	merchantuserList,
	addRevmerchantuser,
	resetmerchantuserpwd
}